package cn.exrick.xboot.modules.base.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author njp
 */
@Data
@Entity
@Table(name = "t_user_hierarchy")
@TableName("t_user_hierarchy")
@ApiModel(value = "用户的多组织与多岗位中间表")
public class UserHierarchy extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "用户id")
    private String userId;
    @ApiModelProperty(value = "所属级别id")
    private String hierarchyId;
    @ApiModelProperty(value = "数据种类，eg:组织或岗位")
    private String type;
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "组织标题，不作为数据库表字段")
    private String title;
}